-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(jmc-agent): clean up probe template utility #241
Conversation
I found that the template file is actually put into storage despite the API returning 400. This causes duplicate upload error when you try to upload the valid template with the same name. After some digging, looks like validation (i.e. for the template specified in #238) is behaving differently between:
With this PR changes, Cryostat will only call However, reloading the UI page will show the same issue in #238. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing with this and https://github.com/cryostatio/cryostat/pull/1563 seems to fix the issues!
* chore(template): correct template name for logs * chore(template): return template when uploading * fix(template): should truly close the inputstream (cherry picked from commit 8c1adac)
* chore(template): correct template name for logs * chore(template): return template when uploading * fix(template): should truly close the inputstream (cherry picked from commit 8c1adac) Co-authored-by: Thuan Vo <thvo@redhat.com>
Fixes #239
Changes include:
addTemplate
should check if template file exists before validating.addTemplate
should return theProbeTemplate
object so that the caller can directly callserialize
on it.trulyClose
.